using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class so_gal_fareconstMap : EntityTypeConfiguration<so_gal_fareconst>
    {
        public so_gal_fareconstMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.SectionString)
                .HasMaxLength(500);

            this.Property(t => t.SECTION_LABEL)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.FARE_SECTION_ID)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.TYPE)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.FIRST_LINE_OF_FARE)
                .IsFixedLength()
                .HasMaxLength(61);

            this.Property(t => t.SECOND_LINE_OF_FARE)
                .IsFixedLength()
                .HasMaxLength(61);

            this.Property(t => t.THIRD_LINE_OF_FARE)
                .IsFixedLength()
                .HasMaxLength(61);

            this.Property(t => t.FOURTH_LINE_OF_FARE)
                .IsFixedLength()
                .HasMaxLength(61);

            this.Property(t => t.FIFTH_LINE_OF_FARE)
                .IsFixedLength()
                .HasMaxLength(61);

            this.Property(t => t.VAT_AMOUNT_MESSAGE_FOR_TICKETING)
                .IsFixedLength()
                .HasMaxLength(61);

            // Table & Column Mappings
            this.ToTable("so_gal_fareconst");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.reference).HasColumnName("reference");
            this.Property(t => t.SectionString).HasColumnName("SectionString");
            this.Property(t => t.MIR).HasColumnName("MIR");
            this.Property(t => t.SECTION_LABEL).HasColumnName("SECTION LABEL");
            this.Property(t => t.FARE_SECTION_ID).HasColumnName("FARE SECTION ID");
            this.Property(t => t.TYPE).HasColumnName("TYPE");
            this.Property(t => t.FIRST_LINE_OF_FARE).HasColumnName("FIRST LINE OF FARE");
            this.Property(t => t.SECOND_LINE_OF_FARE).HasColumnName("SECOND LINE OF FARE");
            this.Property(t => t.THIRD_LINE_OF_FARE).HasColumnName("THIRD LINE OF FARE");
            this.Property(t => t.FOURTH_LINE_OF_FARE).HasColumnName("FOURTH LINE OF FARE");
            this.Property(t => t.FIFTH_LINE_OF_FARE).HasColumnName("FIFTH LINE OF FARE");
            this.Property(t => t.VAT_AMOUNT_MESSAGE_FOR_TICKETING).HasColumnName("VAT AMOUNT MESSAGE FOR TICKETING");
        }
    }
}
